#include "CCamion.h"

//------------------------------------------------------------------------------
__fastcall CCamion::CCamion( const AnsiString &asNom,
                             const AnsiString &asDescription,
                             const double &dPrix,
                             const double &dPTotal,
                             const double &dPTransportable,
                             const int &Numero_Materiel)
            : CKiloutouMachine( asNom, asDescription, dPrix, ID_Materiel)
{
    m_dPoidsTotal         = dPTotal;
    m_dPoidsTransportable = dPTransportable;
}

//------------------------------------------------------------------------------

__fastcall CCamion::CCamion( void )
    : CKiloutouMachine()
{
   m_dPoidsTotal = 0;
   m_dPoidsTransportable = 0;
}

//------------------------------------------------------------------------------

AnsiString __fastcall CCamion::GetLibelle( void )
{
    return Nom;
    //return "Nom " + Nom + " Description " + Description + " Prix " +Prix + " €" + " " + PoidsTotalCamion + " kg " + PoidsTransportable + " kg " ;
}

//------------------------------------------------------------------------------

void __fastcall CCamion::Affecter(const AnsiString &asNom,
                                  const AnsiString &asDescription,
                                  const double &dPrix,
                                  const double &dPTotal,
                                  const double &dPTransportable,
                                  const int &Numero_Materiel)
{
    Nom                 = asNom;
    Description         = asDescription;
    Prix                = dPrix;
    PoidsTotal          = dPTotal;
    PoidsTransportable  = dPTransportable;
    ID_Materiel         = Numero_Materiel;
}

//------------------------------------------------------------------------------
bool __fastcall CCamion::Ajouter( void )
{
    return GereCamion( OPE_Ajout );
}

//------------------------------------------------------------------------------
bool __fastcall CCamion::Modifier( void )
{
    return GereCamion( OPE_Modif );
}

//------------------------------------------------------------------------------
bool __fastcall CCamion::Supprimer( void )
{
    return GereCamion( OPE_Suppr );
}

//------------------------------------------------------------------------------

